<html>
<head><meta charset="utf-8"><title>Just had a weird experience with cargo pulling wrong version · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html">Just had a weird experience with cargo pulling wrong version</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="234540240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234540240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Joyce <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234540240">(Apr 14 2021 at 17:27)</a>:</h4>
<p>I just had a weird experience with cargo pulling the wrong version of a crate. My project was compiling fine, then broke last night with a strange error in a dependency. I tried cargo clean, cargo update -p wonky-package, etc, and nothing worked. Finally, I went into the cargo cache, manually deleted the directory, and cargo finally pulled the package again, and the issue was gone.</p>



<a name="234544156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234544156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234544156">(Apr 14 2021 at 17:49)</a>:</h4>
<p>have you maybe edited a file in the package cache by accident?</p>



<a name="234546418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234546418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234546418">(Apr 14 2021 at 18:02)</a>:</h4>
<p>does cargo not mark those as readonly?</p>



<a name="234549939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234549939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234549939">(Apr 14 2021 at 18:25)</a>:</h4>
<p>no, I don't think so</p>



<a name="234559850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234559850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Joyce <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234559850">(Apr 14 2021 at 19:28)</a>:</h4>
<p>No, I don't think so. The issue was with block comments.</p>



<a name="234575745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234575745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234575745">(Apr 14 2021 at 21:06)</a>:</h4>
<p>what exactly was the error?</p>



<a name="234739694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234739694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Philipp Korber <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234739694">(Apr 15 2021 at 19:39)</a>:</h4>
<p>I hat a similar Problem in my Case a dependency was corrupted. Concretely in rusty_fork the fork method had Fn trait bonds instead of FnMut bound.</p>



<a name="234740417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234740417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Philipp Korber <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234740417">(Apr 15 2021 at 19:43)</a>:</h4>
<p>While I had some other suspects first I later blamed visual studio code, as I had cases where a rename feature renamed dependencies code before (through in typescript). Mainly it seems that of you open a project through a sym-link dir vscode can get really confused with all kinds of things and I had it opened like that. (I was aware of the sym-link problem before but forgot to make sure to use a real path).</p>
<p>Through I have no proof at all that the sys-link problem was the cause in this case, it was just a likely subject.</p>



<a name="234740841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234740841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234740841">(Apr 15 2021 at 19:46)</a>:</h4>
<p>yeah, rust-analyzer will also happily edit dependency code</p>



<a name="234843139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Just%20had%20a%20weird%20experience%20with%20cargo%20pulling%20wrong%20version/near/234843139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Just.20had.20a.20weird.20experience.20with.20cargo.20pulling.20wrong.20version.html#234843139">(Apr 16 2021 at 12:22)</a>:</h4>
<p>There are a few proposals for a ready only mode being added to vscode/lsp but nothing's materialized so far.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>